As known in the field of computer virtualization, a hypervisor is a software component that provides, on a physical machine (i.e., a host system), an execution environment in which one or more virtual machines (VMs) can run. As part of its duties, the hypervisor provisions a portion of the physical hardware resources of the host system to each VM in the form of a virtual hardware platform (comprising, e.g., virtual CPU(s), guest virtual memory, etc.). A guest operating system (OS) running within each VM carries out workloads using the VM's virtual hardware platform, which causes those workloads to be executed on the host physical hardware mapped to (i.e., backing) the virtual hardware.
For example, in a scenario where a VM is configured to have X virtual CPUs (vCPUs), the hypervisor will allocate to each vCPU a time slice of a host CPU (typically determined by a user-defined CPU “share” or “limit” value). When the guest OS of the VM submits a workload to be executed using the VM's vCPUs, the hypervisor will schedule the workload on the host CPUs that back the vCPUs. The hypervisor will generally perform this scheduling in a manner that ensures the amount of host CPU time (i.e., clock cycles) consumed by each vCPU does not exceed the vCPU's allocated share.
In some cases, the guest OS of a VM may support mechanisms that allow it to set desired power and/or performance states for its vCPU(s) based on, e.g., the nature of the workloads being executed or other criteria. Information regarding the vCPU power/performance states could be useful to the hypervisor in more optimally managing the allocation and use of host CPU resources by each vCPU. However, existing hypervisors are not designed to support and/or leverage these VM-level power and performance mechanisms in order to facilitate host CPU resource optimization.